#pragma once
#include "common_tool/factory.h"
#include "kf_vehicle_base.hpp"
#include "kf_lateral.h"
#include "kf_lateral2dof.h"
#include "kf_ll_yaw.h"

namespace auto_ros
{
namespace control
{
template <class derived>
KfVehicleBase *createKfDerived(std::string kf_vehicle_yaml_path_name, double rate)
{
	return new derived(kf_vehicle_yaml_path_name, rate);
}
using kf_factory_type = auto_ros::common_tool::Factory<std::string, KfVehicleBase, KfVehicleBase *(*)(std::string kf_vehicle_yaml_path_name, double rate)>;
class KfFactory : public kf_factory_type
{
private:
	/* data */
public:
	KfFactory()
	{
		//Register("KfLateral", createKfDerived<KfLateral>);
		Register("KfLateral2dof", createKfDerived<KfLateral2dof>);
		Register("KfLLYaw", createKfDerived<KfLLYaw>);
	}
};
} // namespace control
} // namespace auto_ros
